<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <title>亚特斯·易大师后台管理</title>
  <!-- Tell the browser to be responsive to screen width -->
  <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
  <link rel="shortcut icon" type="image/x-icon" href="favicon.ico">
  <link rel="stylesheet" href="css/bootstrap.min.css">
  <link rel="stylesheet" href="css/font-awesome.min.css">
  <link rel="stylesheet" href="css/AdminLTE.min.css">
  <!-- AdminLTE Skins. Choose a skin from the css/skins
       folder instead of downloading all of them to reduce the load. -->
  <link rel="stylesheet" href="css/all-skins.min.css">
  <link rel="stylesheet" href="css/main.css">
  <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
  <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
  <!--[if lt IE 9]>
  <script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
  <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
  <![endif]--> 
  <script src="libs/jquery.min.js"></script>
  <script src="libs/validator.min.js"></script>
  <script src="plugins/jquery-validation/jquery.validate.min.js"></script>
<script src="plugins/jquery-validation/jquery.validate.addMethod.js"></script>
</head>
<!-- ADD THE CLASS layout-boxed TO GET A BOXED LAYOUT -->
<body class="hold-transition skin-blue sidebar-mini">
<!-- Site wrapper -->
<div class="wrapper" id="rrapp" v-cloak>
  <header class="main-header">
    <a href="javascript:;" class="logo">
      <!-- mini logo for sidebar mini 50x50 pixels -->
      <span class="logo-mini"><b>SNA</b></span>
      <!-- logo for regular state and mobile devices -->
      <span class="logo-lg"><b>后台管理</b><b></b></span>
    </a>
    <!-- Header Navbar: style can be found in header.less -->
    <nav class="navbar navbar-static-top" role="navigation">
      <!-- Sidebar toggle button-->
      <a href="#" class="sidebar-toggle" data-toggle="offcanvas" role="button">
        <span class="sr-only">Toggle navigation</span>
      </a>
	  <div style="float:left;color:#fff;padding:15px 10px;">欢迎 {{user.username}}</div>
      <div class="navbar-custom-menu">
        <ul class="nav navbar-nav">
          <li><a href="#" @click="update"  data-toggle="modal" data-target="#Yprice"><i class="fa fa-list-ul"></i> &nbsp;个人信息</a></li>
		  <li><a href="javascript:;" @click="updatePassword"><i class="fa fa-lock"></i> &nbsp;修改密码</a></li>
          <li><a href="javascript:;" @click="logout"><i class="fa fa-sign-out"></i> &nbsp;退出系统</a></li>          
		</ul>
      </div>
    </nav>
  </header>
	
  <!-- =============================================== -->

  <!-- Left side column. contains the sidebar -->
  <aside class="main-sidebar">
    <!-- sidebar: style can be found in sidebar.less -->
    <section class="sidebar">
      <!-- /.search form -->
      <!-- sidebar menu: : style can be found in sidebar.less -->
      <ul class="sidebar-menu">
        <li class="header">导航菜单</li>
        
        <!-- vue生成的菜单 -->
		<menu-item :item="item" :index="index" v-for="(item, index) in menuList"></menu-item>
      </ul>
    </section>
    <!-- /.sidebar -->
  </aside>
  <!-- =============================================== -->
  <!-- Content Wrapper. Contains page content -->
  <div class="content-wrapper">
    <!-- Content Header (Page header) -->
    <section class="content-header">
      <ol class="breadcrumb" id="nav_title" style="position:static;float:none;">
        <li class="active"><i class="fa fa-home" style="font-size:20px;position:relative;top:2px;left:-3px;"></i> &nbsp; 首页</li>
        <li class="active">{{navTitle}}</li>
      </ol>
    </section>

    <!-- Main content -->
    <section class="content" style="background:#fff;">
      <iframe scrolling="yes" frameborder="0" style="width:100%;min-height:200px;overflow:visible;background:#fff;" :src="main"></iframe>
    </section>
    <!-- /.content -->
  </div>
  <!-- /.content-wrapper -->

  <footer class="main-footer">
    <div class="pull-right hidden-xs">
      Version 1.0.0
    </div>
    Copyright &copy; 2017 <a href="http://www.mya.io" target="_blank">mya.io</a> All Rights Reserved
  </footer>

  <!-- Add the sidebar's background. This div must be placed
       immediately after the control sidebar -->
  <div class="control-sidebar-bg"></div>
  
  <!-- 修改密码 -->
<div id="passwordLayer" style="display: none;">
	<form class="form-horizontal">
	<div class="form-group">
		<div class="form-group">
		   	<div class="col-sm-2 control-label">账号</div>
		    <span class="label label-success" style="vertical-align: bottom;">{{user.username}}</span>
		</div>
		<div class="form-group">
		   	<div class="col-sm-2 control-label">原密码</div>
		   	<div class="col-sm-10">
		      <input type="password" class="form-control" v-model="password" placeholder="原密码"/>
		    </div>
		</div>
		<div class="form-group">
		   	<div class="col-sm-2 control-label">新密码</div>
		   	<div class="col-sm-10">
		      <input type="text" class="form-control" v-model="newPassword" placeholder="新密码"/>
		    </div>
		</div>
	</div>
	</form>
</div>

 <!-- =============================================== -->
		<div class="modal fade bs-example-modal-lg" id="Yprice">
	    <div class="modal-dialog  modal-lg" role="document" style="overflow-x: hidden">
	        <div class="modal-content">
	            <div class="modal-header">
	                <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span></button>
	                <h4 class="modal-title"> 个人信息</h4>
	            </div>
	            <div class="modal-body">
	                <form class="container row" id="form">
<!-- 	                    <div class="form-group col-lg-5" style="display: none" >
						   	<div class=" control-label">用户</div>
						    <span class="label label-success"   id="val">{{user.userId}}</span>
						</div> -->
	               	<div class="form-group col-lg-5" style="display:block">
                        <label  class="control-label">账号:</label><!-- border:none -->
                        <input type="text" class="form-control" v-model="customerentity.username" style="width:300px;" readonly>
                    </div>
                    <div class="form-group col-lg-5" style="display:block" style="overflow-x: hidden">
                        <label  class="control-label">角色名称:</label>
                        <input type="text" class="form-control" v-model="customerentity.rolename"  style="width:300px" readonly>
                    </div>
                    <div class="form-group col-lg-5">
                        <label  class="control-label">邀请码:</label>
                        <input type="text" class="form-control" v-model="customerentity.incode"   style="width:300px" readonly>
                    </div>
                    <div class="form-group col-lg-5">
                        <label  class="control-label">公司名称/姓名:</label>
                        <input type="text" class="form-control" v-model="customerentity.cusCompany"   style="width:300px" readonly>
                    </div>
                    <div class="form-group col-lg-5">
                        <label  class="control-label">手续费占比:</label>
                        <input type="text" class="form-control"  v-model="customerentity.cusPoundage" style="width:300px" readonly>
                    </div>
                    <div class="form-group col-lg-5">
                        <label  class="control-label">头寸占比:</label>
                        <input type="text" class="form-control" v-model="customerentity.cusPosition"  style="width:300px" readonly>
                    </div>
                    <div class="form-group col-lg-5">
                        <label  class="control-label">账户余额:</label>
                        <input type="text" class="form-control" v-model="customerentity.cusBalance"  style="width:300px" readonly>
                    </div>
                    <div class="form-group col-lg-5">
                        <label  class="control-label">注册日期:</label>
                        <input type="text" class="form-control" v-model="customerentity.retime"  style="width:300px" readonly>
                    </div>
                    <div class="form-group col-lg-5">
                        <label  class="control-label">手机号:</label>
                        <input type="text" class="form-control" name = "mobile" v-model="customerentity.mobile"  style="width:300px">
                    </div>
                    <div class="form-group col-lg-5">
                        <label  class="control-label">银行名称:</label>
                        <input type="text" class="form-control" name = "bankname" v-model="customerentity.bankCardName"  style="width:300px">
                    </div>
                    <div class="form-group col-lg-5">
                        <label  class="control-label">开户支行:</label>
                        <input type="text" class="form-control" name = "branch" v-model="customerentity.openBranch"  style="width:300px">
                    </div>
                    <div class="form-group col-lg-5">
                        <label  class="control-label">开户名:</label>
                        <input type="text" class="form-control" name = "accname" v-model="customerentity.perAccount"  style="width:300px">
                    </div>
                    <div class="form-group col-lg-5">
                        <label  class="control-label">银行卡号:</label>
                        <input type="text" class="form-control" name = "card" v-model="customerentity.bankAccount"  style="width:300px">
                    </div>                   
	                    
	                </form>
	            </div>
	            <div class="modal-footer">
	                <button type="button" class="btn btn-danger" data-dismiss="modal">关闭</button> 
	                <button type="button" class="btn btn-primary" @click="updateCust"  >确认修改</button>          
	            </div>
	        </div>
	    </div>
	</div>
	
	
</div>
<!-- ./wrapper -->
<script>
function validform(){
	  /*关键在此增加了一个return，返回的是一个validate对象，这个对象有一个form方法，返回的是是否通过验证*/
	  return $("#form").validate({
	     rules : {	    	  
	    		mobile: {  
	    			required: true,
                    maxlength: 11,
                    mopbilephone: true
	            },
	            bankname: {	            	 
	            	 minlength: 1,
		             maxlength: 20
          		},
          		branch: {
	            	minlength: 1,
		            maxlength: 20
	            },
	            accname: {
	            	minlength: 1,
		            maxlength: 20
	            },
	            card: {    
	            	 minlength: 16,
		             maxlength: 21 	                
 	            } 
	        },
	          messages : {	         
	        	mobile: {  
	        		required: '请输入手机号码',
	                maxlength:'手机号码格式不正确!'	               
	            },
	            bankname: {
	            	minlength: '最少输入1个字符',
	                maxlength: '最多输入20个字符'
           		},
           		branch: {
           			minlength: '最少输入1个字符',
	                maxlength: '最多输入20个字符'
	            },
	            accname: {
	            	minlength: '最少输入1个字符',
	                maxlength: '最多输入20个字符'
	            },
	            card: {    
	            	minlength: '最少输入16个字符',
	                maxlength: '最多输入21个字符'
	            }       
	       }  
	  });
	  
	}
	//注册表单验证
	$(validform());	
</script> 

<script src="plugins/jqgrid/jquery.jqGrid.min.js"></script>
<script src="libs/vue.min.js"></script>
<script src="libs/router.js"></script>
<script src="libs/bootstrap.min.js"></script>
<script src="libs/app.js"></script>
<script src="plugins/layer/layer.js"></script>
<script src="js/common.js"></script>
<script src="js/index.js"></script>
<!-- <script src="js/title.js"></script> -->

</body>
</html>
